Skip to content

fix(opencode): App 전용 review identity 계약을 통합 게이트와 일치 - #523

Merged
opencode-agent[bot] merged 2 commits into
mainfrom
fix/opencode-app-identity-contract
Jul 13, 2026
Merged

fix(opencode): App 전용 review identity 계약을 통합 게이트와 일치#523
opencode-agent[bot] merged 2 commits into
mainfrom
fix/opencode-app-identity-contract

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

요약

  • 중앙 OpenCode workflow가 이미 App 전용 review identity 경계를 적용했는데도 통합 셸 게이트가 과거 workflow/PAT fallback 구현을 계속 요구하던 계약 드리프트를 수정합니다.
  • review 작성은 OPENCODE_APP_TOKEN으로만 허용하고, App identity가 없으면 OPENCODE_REVIEW_IDENTITY_UNAVAILABLE로 fail-closed 한다는 현재 보안 경계를 테스트에 고정합니다.
  • fallback identity로 approval/request-changes를 다시 게시하는 문자열과 재시도 경로가 없음을 명시적으로 검증합니다.
  • 모델 풀 소진 후 재호출하는 중앙 workflow의 trusted ref와 대상 저장소의 base/default branch가 서로 다른 개념임을 통합 테스트에 고정합니다.
  • develop-default 대상 저장소도 중앙 .github workflow는 별도로 선언된 CENTRAL_WORKFLOW_REF에서 dispatch하도록 검증합니다.

발견 경위

  • 최신 중앙 main에 PR #514를 병합해 검증하는 과정에서 focused pytest 150개는 통과했지만 scripts/ci/test_strix_quick_gate.sh가 App-only 구현과 반대되는 7개 stale assertion 및 --ref main 하드코딩 assertion으로 실패했습니다.
  • 실패 문자열은 모두 로그에서 직접 확인했으며, review identity를 workflow/PAT로 되돌리지 않고 테스트 계약을 현재 보안 경계에 맞췄습니다.

검증

  • CodeGraph init/sync 및 관련 workflow/normalizer/gate 경로 탐색: PASS
  • workflow YAML parse: PASS
  • bash -n scripts/ci/test_strix_quick_gate.sh: PASS
  • 최신 중앙 main 병합 후 focused 중앙 회귀: 162 passed
  • git diff --check: PASS
  • 전체 scripts/ci/test_strix_quick_gate.sh: 실행 중이며 current HEAD 체크에서도 결과를 재확인합니다.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 2c3f9a7f82ec334d95def75a43fc07e8d27288fc.

  • Head SHA: 2c3f9a7f82ec334d95def75a43fc07e8d27288fc

  • Workflow run: 29234088103

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["CI script: test_strix_quick_gate.sh"]
  S2 --> I2["review and security gate shell path"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["bash -n plus Strix self-test"]
Loading

@opencode-agent

opencode-agent Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 33699a07e043e7eb50ae061da6ae289b830c7213
  • Workflow run: 29234675630
  • Workflow attempt: 1
  • Gate result: APPROVE (exit 0)

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["CI script: test_strix_quick_gate.sh"]
  S1 --> I1["review and security gate shell path"]
  I1 --> R1["Review risk: CI script: test_strix_quick_gate.sh"]
  R1 --> V1["bash -n plus Strix self-test"]
Loading

# Conflicts:
#	.github/workflows/opencode-review.yml
@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review July 13, 2026 08:15

Requested changes targeted stale head 2c3f9a7; current head 33699a0 contains the fixes and requires a fresh current-head review.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including scripts/ci/test_strix_quick_gate.sh.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence reports test coverage as not applicable because no supported changed source files or package manifests were found.
Docstring coverage: coverage execution evidence reports docstring coverage as not applicable because no supported changed source files or package manifests were found.
DAG: CodeGraph/source-backed behavior map connects scripts/ci/test_strix_quick_gate.sh to the affected review, runtime, or workflow path and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions, object naming, and reserved-word safety for schema/API/config/code surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: Playwright visual, DOM locator, ARIA snapshot, console, and responsive evidence were checked when a web UI surface was present; for non-web surfaces, API/CLI/log/docs/workflow interaction evidence was reviewed instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

Findings

No blocking findings.

Adversarial validation

{"status":"passed","probes":[{"path":"scripts/ci/test_strix_quick_gate.sh","line":766,"hypothesis":"Changes might break backward compatibility with repositories using the old workflow fallback.","attack_or_counterexample":"Verified script passes all assertions and does not introduce regressions.","evidence":"Executed script assertions and verified no regressions.","outcome":"falsified"},{"path":"scripts/ci/test_strix_quick_gate.sh","line":942,"hypothesis":"Removal of fallback tokens might cause failures in environments where the app token is unavailable.","attack_or_counterexample":"Verified script logs `OPENCODE_REVIEW_IDENTITY_UNAVAILABLE` and fails closed when the app token is missing.","evidence":"Executed script with missing app token and verified behavior.","outcome":"falsified"}],"residual_risk":"Low; changes are well-tested and align with the repository's security and workflow patterns."}

Evidence

  • Result: APPROVE
  • Reason: Changes align review identity tests with the central OpenCode contract and improve security by removing fallback tokens.
  • Scope: central OpenCode/Strix review-process
  • Changed files: 1
  • Head SHA: 33699a07e043e7eb50ae061da6ae289b830c7213
  • Workflow run: 29234675630
  • Workflow attempt: 1

This approval path is limited to ContextualWisdomLab/.github central review-process self-repair.

@opencode-agent
opencode-agent Bot merged commit 7253be7 into main Jul 13, 2026
47 checks passed
@opencode-agent
opencode-agent Bot deleted the fix/opencode-app-identity-contract branch July 13, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant